<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
<%@ include file="../include/top.jsp"%>
<%@ include file="../include/errorArea.jsp" %>
<script type="text/javascript">
	function preCreateCommunityService(communityServiceId){
		/* $.post('${ctx}/communityService/saveTreeNode/'+communityServiceId,function(data, textStatus) {
			if(data == '0') {
				layer.alert("请先添加服务分类树");
			}else{
				$.layer({
				    type: 2,
				    maxmin: true,
				    shadeClose: true,
				    title: '服务种类添加',
				    shade: [0.1,'#fff'],
				    offset: [($(window).height() / 10)+'px',''],
				    area: ['1000px', '500px'],
				    iframe: {src: '${ctx}/communityService/preCommunityService/'+communityServiceId}
				}); 
			}
		},"json");  */
		document.searchForm.action = '${ctx}/communityServiceMange/listCommunityServiceMange/' + communityServiceId;
        document.searchForm.submit(); 
	}
</script>
</head>

<body>
<form action="${ctx}/communityService/listCommunityService" method="get" name="searchForm" id="searchForm">
		<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
		  <tr>
		    <td height="5" colspan="2"></td>
		  </tr>
		
		    <tr>
		      <td height="20" align="left" valign="middle">
		      <img src="${baseURL}/images/009.png" width="16" height="16" align="absmiddle" />
		      &nbsp;搜索条件：&nbsp;
		      </td>
		    </tr>
		    <tr>
		      <td height="20" align="left" valign="middle">  
		      	小区名称：
		        <input name="username" type="text" class="button" id="username"
					value="${formdata.username}" size="20"/>
			  </td>
		    </tr>
		    <tr>
		      <td height="20" align="center" valign="middle">
		      <input name="image" type="image" id="Image8" onmouseover="MM_swapImage('Image8','','${baseURL}/images/button_ss_a.jpg',1)" onmouseout="MM_swapImgRestore()" src="${baseURL}/images/button_ss.jpg"/>
		      &nbsp;&nbsp;&nbsp;&nbsp;
		      <img src="${baseURL}/images/button_qk.jpg" name="clearButton" id="clearButton" style="cursor:pointer" onclick="clearInput()" onmouseover="MM_swapImage('clearButton','','${baseURL}/images/button_qk_a.jpg',1)" onmouseout="MM_swapImgRestore()"/>
		      </td>
		    </tr>
		  <tr>
		    <td height="5" colspan="2"></td>
		  </tr>
		  <tr>
		    <td height="1" colspan="2" bgcolor="#A6CAE8"></td>
		  </tr>
		  <tr>
		    <td height="5" colspan="2" class="text_gray2"></td>
		  </tr>
		</table>
</form>
<c:if test="${empty obj.list}">
<div align="center"><b>没有符合条件的记录。</b></div>
</c:if>
<c:if test="${not empty obj.list}">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" id="listOutTable">
  <tr>
    <td colspan="2" align="left" valign="middle" class="text_gray2"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#96bee2">
      <tr>
        <td height="21" background="${baseURL}/images/table_bg.jpg">&nbsp;&nbsp;
        <span class="text_blue_b">
        <img src="${baseURL}/images/008.png" width="16" height="16" align="absmiddle" />&nbsp;用户列表：</span></td>
      </tr>
      <tr>
        <td height="13" valign="top" bgcolor="#FFFFFF">
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF" id="listTable">
	<tr align="center" bgcolor="#eeeeee">
		<td width="5%">编号</td>
		<td width="20%">小区名称</td>
		<td width="25%">小区地址</td>
		<td width="25%">楼栋号</td>
		<td>操作</td>
	</tr>
	<c:forEach var="oneRow" items="${obj.list}">
		<tr align="center">
			<td>${oneRow.id}</td>
			<td align="left">${oneRow.communityName}</td>
			<td>${oneRow.address}</td>
			<td>${oneRow.buildingNo}号楼</td>
			<td>
				<a href="#" onclick="preCreateCommunityService(${oneRow.id})">[添加服务]</a>
			</td>
		</tr>
	</c:forEach>
        </table>
        </td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="1" colspan="2" bgcolor="#A6CAE8"></td>
  </tr>
  <tr>
    <td height="25" colspan="2"><%@ include file="../include/listpage.jsp"%>
    </td>
  </tr>
  <tr>
    <td height="1" colspan="2" bgcolor="#A6CAE8"></td>
  </tr>
</table>
<script src="${ctx}/js/listCompanyUser.js"></script>
</c:if>

<%@ include file="../include/bottom.jsp"%>
</body>
</html>